﻿using Microsoft.Practices.Unity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Ymca.Entities;
using Ymca.Web.Services.Interfaces;

namespace Ymca.Web.Controllers
{
    public class MediaController : Controller
    {
		private IUnityContainer _container;
		private IAttachmentService _attachmentService;

		public MediaController()
		{
			_container = ContainerConfig.Container;
			_attachmentService = _container.Resolve<IAttachmentService>();
		}

		public ActionResult Image(int id)
		{
			GalleryItem attachment = _attachmentService.Get(id);
			return View(attachment);
		}

    }
}
